class ListNode(object):
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next


class Solution(object):
    def deleteMiddle(self, head):
        pre_mut = ListNode(0 , head)
        pre = pre_mut
        node = head
        index = 0
        while node:
            index += 1
            if index % 2 == 0:
                pre = pre.next
            node = node.next
        pre.next = pre.next.next
        return pre_mut.next




